<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta name="screen-orientation" content="portrait">
    <meta name="x5-orientation" content="portrait">
    <title>享云商户通</title>
    <link rel="stylesheet" href="../../styles/h5/reset.min.css"/>
    <link rel="stylesheet" href="../../styles/h5/errortankuang.css"/>
    <!--以上为公共css样式-->
    <link rel="stylesheet" href="../../styles/h5/index.css"/>

    <script charset="utf-8" type="text/javascript" src="../../scripts/h5/jquery-1.9.1.min.js"></script>
    <script charset="utf-8" type="text/javascript" src="../../scripts/h5/jquery.modal.js"></script>
    <!--以上为公共js文件-->
</head>
<body>
<div class="zz-cooperation">
    <img src="../../image/h5/img_jiameng@2x.png" alt="">
    <p>享云在全国范围内招募优秀合作伙伴加盟，提供全套产品及管理软件，给予良好的发展环境。</p>
    <span>您可拨打24小时服务热线或者留下您的联系方式</span>
</div>
<div class="zz-top"></div>
<div class="zz-method">
    <div class="zz-color">加盟方式</div>
    <div class="zz-phone">
        <i class="zz-phone-icon"></i>
        <span>合作热线：</span>
        <a href="tel:4001125883">400-112-5883</a>
    </div>
</div>
<div class="zz-input">
    <div class="zz-input-list clear">
        <span class="zz-your">您的姓名：</span
        ><input class="zz-your-name" type="text" maxlength="5"/>
    </div>
    <div class="zz-input-list clear">
        <span class="zz-your">联系方式：</span
        ><input class="zz-your-phone" type="tel" maxlength="32"/>
    </div>
</div>
<div style="padding-bottom: .6rem">
    <input class="footer bg" type="button" value="立即合作" >
</div>

</body>
<script charset="utf-8" type="text/javascript" src="../../scripts/h5/utils.js"></script>
<script charset="utf-8" type="text/javascript" src="../../scripts/h5/index.js"></script>
<script charset="utf-8" type="text/javascript">
    $footer.click(function () {
        var submitName = $(".zz-your-name").val();
		
		//只能中 文 长度2-5之间;
        if (!utils.effectiveName(submitName, $footer)) {
            return false;
        }

        var mobileId = $(".zz-your-phone").val();
        var num = /^\d{7,32}$/;
        if (!num.test(mobileId)) {
            new $.modal({
                content: '请输入正确的联系方式!',//弹框内容
                showcontent: true,//false为弹出框组件二，true为弹出框组件一
            }).show($footer);
            return false;
        };
        
        new $.modal({
            content: "加载中",
            animation: true//调用动画
        }).show();
        //$footer.attr("disabled", "true");
        //提交
        $.ajax({
            url: utils.ajaxUrl()+"h5/developmentController/saveBusiExpansion",
            data: {
                submitName: submitName,
                mobileId: mobileId
            },
            async: false,
            type: 'get',
            success: function (res) {
            	var res = JSON.parse(res);
        		//console.log(res);
                if (res && res.retCode == '0000') {
                	new $.modal({
            			animation: true,//调用动画
        			}).hide(0);
                    new $.modal({
                        content: '我们已收到您的信息，会尽快与您联系!',//弹框内容
                        showcontent: true,//false为弹出框组件二，true为弹出框组件一
                    }).show($footer);
                    window.setTimeout(function () {
                    	//$footer.removeAttr("disabled");
                        WeixinJSBridge.call('closeWindow');
                    }, 3000);
                }else{
                	new $.modal({
            			animation: true,//调用动画
        			}).hide(0);
                    new $.modal({
                        content: res.retMsg,//弹框内容
                        showcontent: true,//false为弹出框组件二，true为弹出框组件一
                    }).show($footer);
                }
            }
        });
    })


</script>
</html>